//这里时导入二次封装好的axios
import request from '@/utils/request'


// 获取接口
export const getannouncement=(index,index2,current,size)=>request({url:"/announcement/admin/getAnnouncement?index="
+index+"&index2="+index2+"&current="+current+"&size="+size,method:"get" })

// 修改公告
export const updateannouncement=(announcement)=>request({url:"/announcement/admin/update",data:{id:announcement.id,content:announcement.content},method:"put"})

// 删除公告
export const delannouncement=(id)=>request({url:"/announcement/admin/del?id="+id,method:"delete"})

// 添加公告
export const addannouncement=(content)=>request({url:"/announcement/admin/add?content="+content,method:"post"})
